<?php
namespace catchAdmin\system\tables;

use catchAdmin\system\tables\forms\Factory;
use catcher\CatchTable;
use catcher\library\table\Actions;
use catcher\library\table\HeaderItem;

class PathTemplatenode extends CatchTable
{
    protected function form()
    {
        // TODO: Implement form() method.
        return Factory::create('PathTemplatenode');
    }

    protected function table()
    {
        // TODO: Implement table() method.
        return $this->getTable('PathTemplatenode')
            ->header([
                HeaderItem::label()->selection(),
                HeaderItem::label('路径模板名称')->prop('name'),
                HeaderItem::label('路径模板值')->prop('value'),
                HeaderItem::label('创建时间')->prop('created_at'),
                HeaderItem::label('更新时间')->prop('updated_at'),
                HeaderItem::label('操作')->actions([
                    Actions::update(),
                    Actions::delete()
                ])
            ])
            ->withActions([
                Actions::create()
            ])
            ->withDialogWidth('35%')
            ->withApiRoute('pathTemplatenode')
            ->selectionChange()
            ->render();
    }
}